<h1>Listing products</h1>

<%= form_tag products_path, :method => 'get' do %>
<%= hidden_field_tag :direction, params[:direction] %>
<%= hidden_field_tag :sort, params[:sort] %>
<p>
	<%= text_field_tag :search, params[:search] %>
	<%= submit_tag "Search", :name => nil %>
</p>
<% end %>

<%= render 'products' %>
<br />

<%= link_to 'New Product', new_product_path, :class => "btn btn-default"  %>
